1. Field of the Invention
The present invention relates to an electronic controller to be mounted in a vehicle, such as an engine controller, a transmission controller, a brake controller and the like, which are serially connected to each other through a local area network (LAN) transceiver, in particular, to improvement of the “electronic controller to be connected to a program tool” for application of an improved writing device for an input/output control program and a writing device for a variable control constant associated with the input/output control program.
2. Description of the Related Art
In an electronic controller including a program memory which stores an input/output control program therein and a microprocessor to cooperate with the program memory, the following is known. Specifically, an external tool, which is a writing/rewriting device for the input/output control program, and the electronic controller are connected to each other through a CAN bus which is an in-vehicle LAN so as to write and rewrite the input/output control program by using the bus communication line.
For example, according to FIG. 1 of “communication device for on-vehicle electronic control device” described in Japanese Patent Application Laid-open No. 2005-297653, the following technology is disclosed. Specifically, a rewrite-target electronic control unit 10 stops self-diagnosis and transmission of the result of self-diagnosis based on a write start request signal from an external tool 20. Non-rewrite target electronic control units 12 and 14 stop self-diagnosis and transmission of the results of self-diagnosis based on the write start request signal from the external tool 20 and a self-diagnosis stop request signal from the rewrite-target electronic control unit, or a self-diagnosis stop request signal from the rewrite-target electronic control unit and a self-diagnosis result transmission stop signal from another non-rewrite target electronic control unit. After the stop of the self-diagnosis and the stop of the transmission of the results of self-diagnosis in the rewrite-target electronic control unit 10 and the non-rewrite target electronic control units 12 and 14, the external tool 20 transmits data to the rewrite-target electronic control unit 10 to rewrite the control program. In the above-mentioned manner, in the case where the control program stored in one of the plurality of electronic control units which are connected to each other through the communication line is to be rewritten, an erroneous operation caused by the detection of an abnormality by another one of the electronic control units is prevented.
Moreover, the following is also known. A non-volatile flash memory which is electrically readable and writable is used as the program memory. The program memory is divided into a control-program storage area and an adjustment-value storage area, and write and rewrite can be performed for each of the storage areas.
For example, according to FIGS. 2 and 7 of “controller, and apparatus, method and program for rewriting” described in Japanese Patent Application Laid-open No. 2006-331185, the following technology is disclosed. Specifically, a storage section 11 of a controller 10 is configured to have two areas, that is, an adjustment-value storage part 11a and a program storage part 11b. Moreover, a rewrite processing section 23a of a rewrite device 20 is configured to perform program rewrite processing for rewriting a control program stored in the program storage part 11b of the controller 10 with a new control program and/or adjustment-value rewrite processing for rewriting an adjustment value stored in the adjustment-value storage part 11a with a new adjustment value. Further, a rewrite check processing section 23b of the rewrite device 20 is configured to verify whether or not the rewrite processing has been successfully performed. In this manner, the controller 10 capable of reducing manufacturing cost and ensuring product quality even after stored data is changed and the rewrite device 20 therefor are provided.
Moreover, the rewrite device 20 includes communication means for intercommunication with the controller 10 through an in-vehicle LAN. By the communication means, the data stored in the memory included in the controller 10 is rewritten.
Further, the following is also known. A non-volatile flash memory which is electrically readable and writable is used as the program memory. The program memory is divided into a main flash area for storing the control program therein and a boot flash area for storing a boot program therein, and write and rewrite on each of the areas can be performed.
For example, according to FIG. 1 of “memory rewrite system for electronic device” described in Japanese Patent Application Laid-open No. 10-149282, a memory rewrite device 4 includes a microcomputer 30, a power-supply circuit 32, and a rewrite switch SW. The microcomputer 30 includes a CPU, a ROM, a RAM, and the like for executing processing for controlling a microcomputer 8 of an ECU 2 to rewrite a flash ROM 20. The power-supply circuit 32 supplies, in accordance with a command from the microcomputer 30, a rewrite voltage Vpp (12 V in the embodiment) required to rewrite data in the flash ROM 20 to the microcomputer 8 of the ECU 2. The rewrite switch SW is used to switch an operation mode of the ECU 2 from a normal mode for engine control to a rewrite mode for rewriting the data in the flash ROM 20.
The flash ROM 20 is divided into a main flash area 20a for storing a control program for engine control and a boot flash area 20b for storing a boot program to be executed immediately after reset is cancelled.
Further, the memory rewrite device 4 includes a first ROM 34, a second ROM 36, and a display device 37. The first ROM 34 stores rewrite control software (specifically, a program code which configures the rewrite control software and data to be referred to at the time of execution of the program) to be transmitted to the ECU 2. The second ROM 36 stores write data (specifically, a new program to be written in the flash ROM 20; hereinafter also referred to as “new software”) to be transmitted to the ECU 2. The display device 37 displays various messages in accordance with a command from the microcomputer 30. The first ROM 34 and the second ROM 36 are provided to the memory rewrite device 4 so as to be removable therefrom through known IC sockets 38 and 40, respectively.